﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OthelloCognition
{
    class RandomSolver : AbstractSolver
    {
        public override SolverEnum SolverName()
        {
            return SolverEnum.Random;
        }

        protected override void examineBoard(OthelloGame.OthelloGameBoard board)
        {
            Random r = new Random();
            if (board.AvailableOptionLocations.Count != 0)
            {
                int n = r.Next() % board.AvailableOptionLocations.Count;
                move = board.AvailableOptionLocations.ElementAt(n);
            }
            else move = null;
        }
    }
}
